import { store } from "@/redux";
import { routerArray } from "@/routes";
import { seachRoute } from "@/utils";
import { useLocation } from "react-router-dom";

const useAuthButton = () => {
  const {pathname} = useLocation()
  const route = seachRoute(pathname, routerArray)

  return {
    BUTTON: store.getState().auth.authButton[route?.meta?.key!] || {}
  }
}

export default useAuthButton;